import axios from 'axios'

// 默认
let request = axios.create({
      baseURL: process.env.SYS_HOST ? process.env.SYS_HOST : '/eao',
      // baseURL: '/eao',
      withCredentials: true,
    })
request.interceptors.response.use((response) => {
  return response.data
})

// 消息
let social = axios.create({
      baseURL: process.env.NOTICE_HOST ? process.env.NOTICE_HOST : '/api',
      withCredentials: true,
      params: {
        app: 'eao',
        app_name: '环评管控系统',
        uid: -1,
      },
    })
social.interceptors.response.use((response) => {
  return response.data
})

export {request, social}
